package com.ihr360.cnb.module.common.service;

import com.ihr360.authority.embed.base.entity.AuthStaffDataModel;
import com.ihr360.authority.embed.base.entity.AuthStaffDataRequest;
import com.ihr360.cnb.module.common.service.fallback.Ihr360StaffApiServiceFallback;
import com.ihr360.entity.PageData;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author richey
 */
@FeignClient(name = "irenshi-staff-api-provider", fallback = Ihr360StaffApiServiceFallback.class)
public interface Ihr360StaffApiService {

    @RequestMapping(value = "/staff/auth/getCanAccessStaffIdDataes", method = RequestMethod.POST)
    PageData<AuthStaffDataModel> getAuthStaffs(@RequestBody AuthStaffDataRequest authStaffDataRequest);

    @RequestMapping(value = "/staff/auth/getCanAccessStaffIdAllDataes", method = RequestMethod.POST)
    List<AuthStaffDataModel> getAllAuthStaffs(@RequestBody AuthStaffDataRequest authStaffDataRequest);

    @PostMapping(value = "/staff/auth/getStaffExcludeDataAllList")
    List<String> getAuthStaffIds(@RequestParam(value = "companyId") String companyId,
                                 @RequestParam(value = "userId") String userId,
                                 @RequestBody AuthStaffDataRequest authStaffDataRequest);
}
